<?php

namespace app\admin\validate;

use think\Validate;

class Article extends Validate
{
    protected $rule = [
        'title'  =>  'require|max:25|unique:article',
        'author'  =>  'require|max:10',
		'cateid' => 'require',
    ];
	
	protected $message  =   [
	        'title.require' => '文章标题必须填写',
	        'title.max'     => '文章标题最多不能超过25个字符',
	        'title.unique'     => '文章标题不得重复',
			'author.require' => '作者必须填写',
			'author.max'     => '作者最多不能超过10个字符',
			'cateid.require' => '所属栏目必须填写',
	    ];

}